package pl.s7n.paint.commands;

import java.awt.Graphics2D;
import java.awt.Point;

public class TextStrokeCmd extends AbstractStrokeCmd {

  String text;

  @Override
  public void draw(Graphics2D g) {
    super.draw(g);
    Point where = (Point) shape;
    g.drawString(text, where.x, where.y);
  }

  @Override
  public String toString() {
    return "text";
  }

  public String getText() {
    return text;
  }

  public void setText(String text) {
    this.text = text;
  }
}
